#ifndef ABSTRACTASK
#define ABSTRACTASK

#include "TaskResult.h"
#include "Utils.h"
#include <string>

/*!
 * \file AbstractTask.h
 * \author aimery aviles / thomas raynal
 * \version 2.0
 */

/*! \namespace Network
 * 
 * Group master/slave task template & task handling utilities (trees & graphs)
 */
namespace MasterWorkerFramework
{
/*! \class AbstractTask
* \brief Interface for task implentation
*/
class AbstractTask {
public:
	
	/*!
	*  \brief Routine for task completion handling
	*
	*/
	virtual void Join()=0;
	/*!
	*  \brief Append a result to the binded result collection
	*
	*/
	virtual void AppendResult(TaskResult* r)=0;
	/*!
	*  \brief Execute the task
	*
	*/
	virtual void Execute()=0;
	/*!
	*  \brief Get the task name
	*
	*/
	virtual std::string* GetName()=0;
	/*!
	*  \brief Get the task hash code
	*
	*/
	virtual std::string* GetHash()=0;
	/*!
	*  \brief Get the task statut
	*
	*/
	virtual TASK_STATUT GetStatut()=0;
	/*!
	*  \brief Get the task result
	*
	*/
	virtual TaskResult* GetResult()=0;

};
}
#endif